package action;

import com.opensymphony.xwork2.ActionSupport;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.interceptor.ServletRequestAware;

/**
 *
 * @author corneliugosa
 */
public class ClassesManagement extends ActionSupport implements ServletRequestAware {

    private String selCls;
    private String selPers;
    private String selSubjMatter;
    private HttpServletRequest request;
    private String opt;

    public String execute() {
        HttpSession session = request.getSession();
        if(!selCls.equals("0") && selSubjMatter.equals("0")){
            return "subject";
        }

        return "person";
    }

    public String getSelCls() {
        return selCls;
    }

    public void setSelCls(String selCls) {
        this.selCls = selCls;
    }

    public String getSelPers() {
        return selPers;
    }

    public void setSelPers(String selPers) {
        this.selPers = selPers;
    }

    public String getSelSubjMatter() {
        return selSubjMatter;
    }

    public void setSelSubjMatter(String selSubjMatter) {
        this.selSubjMatter = selSubjMatter;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public String getOpt() {
        return opt;
    }

    public void setOpt(String opt) {
        this.opt = opt;
    }

    @Override
    public void setServletRequest(HttpServletRequest request) {
        this.request = request;
    }
}
